package com.dailyblue.java.spring.boot.boot01.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/first")
public class FirstController {

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/a")
    public String a() {
        System.out.println("aaa");
        return "This is FirstController`a!";
    }
    @GetMapping("/b")
    public String b() {
        return "This is FirstController`b,port:" + port;
    }
}
